package cn.tedu.charging.order.feign;

import cn.tedu.charging.common.web.JsonResult;
import cn.tedu.charging.common.pojo.param.ChargingProcessParam;
import cn.tedu.charging.common.pojo.vo.ChargingProcessVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("costService")
public interface CostClient {

    @GetMapping("/cost/calculate")
    JsonResult<ChargingProcessVO> calculateCost(ChargingProcessParam chargingProcessParam);

    /**
     * 通过订单号获取当前订单花费
     * @param orderNo
     * @return
     */
    @GetMapping("/cost/info/{orderNo}")
    JsonResult<ChargingProcessVO> getCostByOrderNo(@PathVariable("orderNo") String orderNo);
}
